import java.util.Scanner;

public class experience1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int[] arr = new int[10];
        for(int i = 0;i<arr.length;i++)
            arr[i] = input.nextInt();
        System.out.println("最大值为"+getMax(arr));
        System.out.println("最小值为"+getMin(arr));
        int[] count = getEvenAndOdd(arr);
        System.out.println("奇数个数为"+count[1]+"    偶数个数为"+count[0]);
        System.out.println("第三题的答案为");
        forCprint(arr);
        System.out.print("\n");
        System.out.println("连续数为");
        adjacentPrint(arr);
        }
        //获得最大值
    public static int getMax(int[] arr){
        int max = arr[0];
        for(int i = 0;i<arr.length;i++)
            if(arr[i]>max)
                max = arr[i];
        return max;
    }
    //获得最小值
    public static int getMin(int[] arr){
        int min = arr[0];
        for(int i = 0;i<arr.length;i++)
            if(min>arr[i])
                min = arr[i];
        return min;
    }
    //获得奇偶数
    public static int[] getEvenAndOdd(int[] arr){
        int[] count = {0,0};
        for(int i = 0;i<arr.length;i++)
            if(arr[i]%2==0)
                count[0]++;
            else
                count[1]++;
            return count;
    }
    //题目c
    public static void forCprint(int[] arr){
        int sum = 0;
        for(int i = 0;i<arr.length;i++)
        {
            sum+=arr[i];
            System.out.print(sum+" ");
        }
    }
    //打印连续的数
    public static void adjacentPrint(int[] arr){
        for(int i = 0;i<arr.length;i++) {
            if(arr[i+1]==arr[i])
            {
                System.out.print(arr[i]+" ");
                while(arr[i]==arr[i+1])
                    i++;
            }
        }
        }
}